<?php

	namespace view;
		require_once ("view/InfoBoxView.php");

		class HTMLPageView
		{
			private static $name = "Name";
			private static $password = "Password";
			private static $checkBox = "CheckBox";
			private static $button = "Button";
			private static $assigment = "2";
			

			/**
			 * @param String $title
			 * @param String $status
			 * @param String $returningName
			 * @return String HTML with form
			 */
			public function getPage($title, $status, $returningName)
			{
				$infoBoxView = new \view\InfoBoxView();
				return "<!doctype html><html><head>
	<meta charset=\"utf-8\"/><title>" . $title . " - Labb" .self::$assigment ."</title>
	<meta name=\"viewport\" content=\"width:device-width, initial-scale=1.0\">
	<link rel=\"stylesheet\" type=\"text/css\" 
	href=\"_css/jbdesign_basic.css\"/>
	</head>	<body><div id=\"container\">
	<div id=\"header\"><a href=\"index.html\">
	<img src=\"_img/stars2.png\" alt=\"stars\"></a></div>
	<div id=\"content\"><h3>" . $status . "</h3>
		<form id=\"form\" name=\"form\" method=\"post\" action=\"login.php\">
			<fieldset><legend>" . $title . "</legend>
				<label for=\"name\">Namn:</label>
				<input type=\"text\" id=\"name\" name=\" " . self::$name 
				. "\" value=\"" . $returningName . "\"/>
				<label for=\"password\">Lösen</label>
				<input type=\"password\" id=\"password\" name=\" " 
				. self::$password . "\" value=\"\" />			
				<label for=\"LoggedInStatus\">Fortsätt vara inloggad: </label>
				<input type=\"checkbox\" id=\"LoggedInStatus\" name=\" " 
				. self::$checkBox . "\" value=\"yes\"/></fieldset>
			<fieldset><button  type=\"submit\" name=\" " 
				. self::$button . "\">Logga in</button>
			</fieldset></form>" 
		. $infoBoxView -> getInfobox() . "</div></div>
		<footer>Jenni Berndtson - WP12 - jb222rt</footer>
	</body></html>";
			}
		}
